cmake_minimum_required(VERSION 2.8)
project(ssl_thread)

INCLUDE_DIRECTORIES(
        /usr/local/opt/openssl/include
        /usr/local/Cellar/json-c/0.12/include/json-c
        /usr/local/Cellar/mariadb-connector-c/2.2.2/include/mariadb/
        /usr/local/include/mariadb/
)

link_directories (
        /usr/local/opt/openssl/lib
        /usr/local/Cellar/json-c/0.12/lib
        /usr/local/Cellar/mariadb-connector-c/2.2.2/lib/mariadb/
        /usr/local/lib/mariadb/
)

link_libraries(ssl crypto json-c mysqlclient mariadbclient pthread)


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES
        Main.c
        Sql_parse.c
        Sql_parse.h
        Json_parse.c
        Json_parse.h
        Client.c
        Client.h
        Common.c
        Common.h
        SSL_Thread_Init.c
        SSL_Thread_Init.h)

add_executable(ssl_thread ${SOURCE_FILES})
